import request from '/src/utils/request.js'

//分页查询饮食数据

export const getHealthListApi = (title, categoryId, status, page, pageSize) => {
  return request.get(
    `/healths?title=${title}&categoryId=${categoryId}&status=${status}&page=${page}&pageSize=${pageSize}`
  )
}

//根据id获取养生的详情  方案二
export const getHealthByIdApi = (id) => request.get(`/healths/${id}`)

//新增养生
export const addHealthApi = (healthData) => request.post('/healths/add', healthData)

//修改养生数据
export const updateHealthByIdApi = (healthData) => request.put('/healths/update', healthData)

//删除养生数据
export const delHealthByIdsApi = (ids) => request.delete(`/healths/delete?ids=${ids}`)
